package com.itheima01;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class DieDaiQi {
    public static void main(String[] args) {
        Collection<String> c = new ArrayList<>();
        c.add("JavaEE");
        c.add("JavaME");
        c.add("JavaSE");
        c.add("JavaSE");
        Iterator<String> iterator = c.iterator();
        while (iterator.hasNext()) {
            String next = iterator.next();
            System.out.println(next);
        }
        while (iterator.hasNext()) {
            String next = iterator.next();
            System.out.println(next);
        }
    }
}
